<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/12/10
 * Time: 18:04
 */
namespace app\common\helper;

use app\common\model\SendTag;

class send_helper
{

    /**
     * 添加send_tag
     * @param array $info
     * @return int
     */
    public static function del_send_tag($info)
    {
        if (!isset($info['tag_id']) || !$info['tag_id']
            || !isset($info['user_id']) || !$info['user_id']) {

            return 0;
        }

        $old_filter = array(
            'tag_id'    => $info['tag_id'],
            'user_id'   => $info['user_id']
        );

        return SendTag::where($old_filter)->delete();
    }
}